package com.glela.goods.mapper;

import com.glela.goods.model.GoodsCommission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsCommissionMapper {

	/**
	 * 根据商品id查询商品分佣信息
	 * 
	 * @param goodId
	 * @return
	 */
	public List<GoodsCommission> selectGoodsCommissionListByGoodId(long goodId);

	public GoodsCommission selectGoodsCommissionByGoodId(@Param("goodId") long goodId, @Param("roleId") int roleId);
	
	public GoodsCommission selectLimitTimeSaleCommissionByGoodId(@Param("limitTimeSaleId") long limitTimeSaleId, @Param("goodId") long goodId, @Param("roleId") int roleId);
	/**
	 * @Description: 批量初始化商品佣金
	 * @Author: zhangrenjie
	 * @Date: 2018/2/3 9:48
	 *
	 */
    void insertSelectiveBatch(@Param("commissionList") List<GoodsCommission> commissionList);
}